package com.neucloud.da.edgeside.model.enums;


public enum InferenceStatusEnum {
    STARTING("starting", "启动中"),
    RUNING("running", "运行中"),
    STOP("stop", "已停止"),
    FAIL("fail", "运行异常"),
    ;
    public final String code;
    public final String desc;
    InferenceStatusEnum(String code,  String desc){
        this.code = code;
        this.desc = desc;
    }

    // 根据value返回枚举类型,主要在switch中使用
    public static InferenceStatusEnum getByCode(String code) {
        for (InferenceStatusEnum statusEnum : values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum;
            }
        }
        return null;
    }


}